<template>
 <Card title="通信控制" icon="md-paper-plane" :padding="0" shadow style="width: 100%;">
    <ButtonGroup slot="extra">
      <span style="position: relative;float: left">信息库：</span>
      <Upload :before-upload="importCSV" action style="position: relative;float: left">
        <Button icon="md-download" size="small">关联</Button>
      </Upload>
      <Button icon="md-share-alt" size="small" @click="exportCSV()">取关</Button>
      
      <Dropdown trigger="click" transfer style="position: relative;float: left">
        <Button icon="md-create" size="small">编辑
          <Icon type="ios-arrow-down"></Icon>
        </Button>
        <DropdownMenu slot="list">
            <DropdownItem>New</DropdownItem>
            <DropdownItem>Open</DropdownItem>
        </DropdownMenu>
    </Dropdown>
    </ButtonGroup>
 
      <Divider orientation="left"> TX Frame List</Divider>
      <Table
      border
      :columns="columns"
      :data="messList"
      size="small"
      height="150"
      ref="uartCfgTable"
    >
      <template slot-scope="{ row }" slot="name">
        <input/>
      </template>
        <template slot-scope="{ row }" slot="channel">
        <input/>
      </template>
        <template slot-scope="{ row }" slot="lenght">
        <input/>
      </template>
      <template slot-scope="{ row }" slot="rtr">
        <input/>
      </template>
        <template slot-scope="{ row }" slot="rep">
        <input/>
      </template>
      <template slot-scope="{ row }" slot="key">
        <input/>
      </template>
    </Table>
  </Card>
</template>

<script>
export default {
  data(){
    return{
      columns:[
        {
          title: 'Message Name',
          slot: 'name',
        },
        {
          title: 'Frame Id',
          key:'id'
        },
        {
          title: 'Channel',
          slot:'channel'
        },
        {
          title:'Data Length',
          slot:'lenght'
        },
        {
          title:'RTR',
          slot:'rtr',
        },
        {
          title:"Repetition",
          slot:'rep'
        },
        {
          title:'Key',
          slot:'key'
        }
      ],
      messList:[{
        name: "tt",
        id:'0x67',
        channel:'COM1',
        lenght:'8'
      }]
    }
  }

}
</script>

<style>

</style>